package com.jiazixuan.stock.mapper;

import com.jiazixuan.stock.pojo.domain.SysUserDomain;
import com.jiazixuan.stock.pojo.domain.User;
import com.jiazixuan.stock.pojo.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author 17127
* @description 针对表【sys_user(用户表)】的数据库操作Mapper
* @createDate 2025-08-14 11:17:58
* @Entity com.jiazixuan.stock.pojo.entity.SysUser
*/
public interface SysUserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    SysUser findUserInfoByUserName(@Param("userName") String userName);

    List<SysUser> findAll();

    User getUserByUserName(@Param("username") String username);

    /**
     *多条件综合查询用户分页信息
     */
    List<SysUserDomain> getUsers(@Param("username") String username, @Param("nickName") String nickName, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    /**
     * 添加用户
     * @param user
     * @return
     */
    int addUser(@Param("user") SysUser user);

    int deleteUser(@Param("userIds") List<Long> userIds);

    SysUser getUserInfoById(@Param("id") long id);


}
